package univer.oko.queryAnalizer.sqlEditor;

import javax.swing.text.MutableAttributeSet;
import javax.swing.text.SimpleAttributeSet;
import javax.swing.text.StyleConstants;
import java.awt.*;

/**
 * Created by Sergey Kharlamov.
 * Date: 22.07.2006
 * Time: 18:10:48
 */

public class EditorConstants {

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    //  nastrojka razborschika kljuchevykh slov v mssql
    /**
     * nazvanija sintaksicheskikh kategorij
     */
    public static final String[] TOKENIZER_CATEGORY_NAMES =
            {

                    //  1: MSSQL

                    /* I: Kommentarii  */
                    "zebra.constants.comments",
                    /* II: Vse konstanty  */
                    "zebra.constants.constants",
                    /* III: Kljuchevye slova SQL i T-SQL */
                    "zebra.constants.sql.tsql.keywords",
                    /* IV: Vse sistemnye funktsii  */
                    "zebra.constants.system.functions",
                    /* V: Vse ostal'nye identifikatory  */
                    "zebra.constants.identifiers",
                    /* VI: Vse spetsial'nye simvoly  */
                    "zebra.constants.special.symbols",

            };

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    //  nastrojka razborschika kljuchevykh slov v mssql
    /**
     * podsvechivat' li STRING-constants
     */
    public static final boolean[] TOKENIZER_CATEGORY_STRING_CONSTANTS =
            {
                    //  0: MSSQL

                    /* I: Kommentarii  */
                    false,
                    /* II: Vse konstanty  */
                    false,
                    /* III: Kljuchevye slova SQL i T-SQL */
                    false,
                    /* IV: Vse sistemnye funktsii  */
                    false,
                    /* V: Vse ostal'nye identifikatory  */
                    false,
                    /* VI: Vse spetsial'nye simvoly  */
                    false,
                    /* VII: strokovye constanty  */
                    true

            };
    /**
     * podsvechivat' li NUMBER-constants
     */
    public static final boolean[] TOKENIZER_CATEGORY_NUMBER_CONSTANTS =
            {

                    //  1: MSSQL

                    /* I: Kommentarii  */
                    false,
                    /* II: Vse konstanty  */
                    true,
                    /* III: Kljuchevye slova SQL i T-SQL */
                    false,
                    /* IV: Vse sistemnye funktsii  */
                    false,
                    /* V: Vse ostal'nye identifikatory  */
                    false,
                    /* VI: Vse spetsial'nye simvoly  */
                    false,
                    /* VII: strokovye constanty  */
                    false

            };
    /**
     * podsvechivat' li comments
     */
    public static final boolean[] TOKENIZER_CATEGORY_COMMENTS =
            {

                    //  1: MSSQL

                    /* I: Kommentarii  */
                    true,
                    /* II: Vse konstanty  */
                    false,
                    /* III: Kljuchevye slova SQL i T-SQL */
                    false,
                    /* IV: Vse sistemnye funktsii  */
                    false,
                    /* V: Vse ostal'nye identifikatory  */
                    false,
                    /* VI: Vse spetsial'nye simvoly  */
                    false,
                    /* VII: strokovye constanty  */
                    false

            };
    /**
     * podsvechivat' li spec
     */
    public static final boolean[] TOKENIZER_CATEGORY_SPEC =
            {
                    //  1: MSSQL

                    /* I: Kommentarii  */
                    false,
                    /* II: Vse konstanty  */
                    false,
                    /* III: Kljuchevye slova SQL i T-SQL */
                    false,
                    /* IV: Vse sistemnye funktsii  */
                    false,
                    /* V: Vse ostal'nye identifikatory  */
                    false,
                    /* VI: Vse spetsial'nye simvoly  */
                    true,
                    /* VII: strokovye constanty  */
                    false

            };
    /**
     * podsvechivat' li IDENTIFIERs
     */
    public static final boolean[] TOKENIZER_CATEGORY_IDENTIFIER =
            {

                    //  1: MSSQL

                    /* I: Kommentarii  */
                    false,
                    /* II: Vse konstanty  */
                    false,
                    /* III: Kljuchevye slova SQL i T-SQL */
                    false,
                    /* IV: Vse sistemnye funktsii  */
                    false,
                    /* V: Vse ostal'nye identifikatory  */
                    true,
                    /* VI: Vse spetsial'nye simvoly  */
                    false,
                    /* VII: strokovye constanty  */
                    false

            };
    /**
     * podsvechivat' li proizvol'nyj nabor identifikatorov dlja kazhdoj iz kategorij
     */
    public static final String[][] TOKENIZER_CATEGORY_IDENTIFIER_SET =
            {

                    /* I: Kommentarii  */
                    {},
                    /* II: Vse konstanty  */
                    {},
                    /* III: Kljuchevye slova SQL i T-SQL */
                    {
                            "ABSOLUTE"/*#Frozen*/,
                            "ACTION"/*#Frozen*/,
                            "ADA"/*#Frozen*/,
                            "ADD"/*#Frozen*/,
                            "AFTER"/*#Frozen*/,
                            "ALL"/*#Frozen*/,
                            "ALLOCATE"/*#Frozen*/,
                            "ALTER"/*#Frozen*/,
                            "AND"/*#Frozen*/,
                            "ANY"/*#Frozen*/,
                            "ARE"/*#Frozen*/,
                            "AS"/*#Frozen*/,
                            "ASC"/*#Frozen*/,
                            "ASSERTION"/*#Frozen*/,
                            "AT"/*#Frozen*/,
                            "AUTHORIZATION"/*#Frozen*/,
                            "BACKUP"/*#Frozen*/,
                            "BEGIN"/*#Frozen*/,
                            "BETWEEN"/*#Frozen*/,
                            "BIGINT"/*#Frozen*/,
                            "BINARY"/*#Frozen*/,
                            "BIT"/*#Frozen*/,
                            "BIT_LENGTH"/*#Frozen*/,
                            "BOTH"/*#Frozen*/,
                            "BREAK"/*#Frozen*/,
                            "BROWSE"/*#Frozen*/,
                            "BULK"/*#Frozen*/,
                            "BY"/*#Frozen*/,
                            "CASCADE"/*#Frozen*/,
                            "CASCADED"/*#Frozen*/,
                            "CATALOG"/*#Frozen*/,
                            "CATCH"/*#Frozen*/,
                            "CHAR"/*#Frozen*/,
                            "CHAR_LENGTH"/*#Frozen*/,
                            "CHARACTER"/*#Frozen*/,
                            "CHARACTER_LENGTH"/*#Frozen*/,
                            "CHECK"/*#Frozen*/,
                            "CHECKPOINT"/*#Frozen*/,
                            "CLOSE"/*#Frozen*/,
                            "CLUSTERED"/*#Frozen*/,
                            "COALESCE"/*#Frozen*/,
                            "COLLATE"/*#Frozen*/,
                            "COLLATION"/*#Frozen*/,
                            "COLUMN"/*#Frozen*/,
                            "COMMIT"/*#Frozen*/,
                            "COMPUTE"/*#Frozen*/,
                            "CONNECT"/*#Frozen*/,
                            "CONNECTION"/*#Frozen*/,
                            "CONSTRAINT"/*#Frozen*/,
                            "CONSTRAINTS"/*#Frozen*/,
                            "CONTAINS"/*#Frozen*/,
                            "CONTINUE"/*#Frozen*/,
                            "CORRESPONDING"/*#Frozen*/,
                            "CREATE"/*#Frozen*/,
                            "CROSS"/*#Frozen*/,
                            "CURRENT"/*#Frozen*/,
                            "CURRENT_DATE"/*#Frozen*/,
                            "CURRENT_TIME"/*#Frozen*/,
                            "CURRENT_TIMESTAMP"/*#Frozen*/,
                            "CURRENT_USER"/*#Frozen*/,
                            "CURSOR"/*#Frozen*/,
                            "DATABASE"/*#Frozen*/,
                            "DATE"/*#Frozen*/,
                            "DATETIME"/*#Frozen*/,
                            "DAY"/*#Frozen*/,
                            "DBCC"/*#Frozen*/,
                            "DEALLOCATE"/*#Frozen*/,
                            "DEC"/*#Frozen*/,
                            "DECIMAL"/*#Frozen*/,
                            "DECLARE"/*#Frozen*/,
                            "DEFAULT"/*#Frozen*/,
                            "DEFERRABLE"/*#Frozen*/,
                            "DEFERRED"/*#Frozen*/,
                            "DELETE"/*#Frozen*/,
                            "DENY"/*#Frozen*/,
                            "DESC"/*#Frozen*/,
                            "DESCRIBE"/*#Frozen*/,
                            "DESCRIPTOR"/*#Frozen*/,
                            "DIAGNOSTICS"/*#Frozen*/,
                            "DISCONNECT"/*#Frozen*/,
                            "DISK"/*#Frozen*/,
                            "DISTINCT"/*#Frozen*/,
                            "DISTRIBUTED"/*#Frozen*/,
                            "DOMAIN"/*#Frozen*/,
                            "DOUBLE"/*#Frozen*/,
                            "DROP"/*#Frozen*/,
                            "DUMMY"/*#Frozen*/,
                            "DUMP"/*#Frozen*/,
                            "ELSE"/*#Frozen*/,
                            "END"/*#Frozen*/,
                            "END-EXEC"/*#Frozen*/,
                            "ERRLVL"/*#Frozen*/,
                            "ESCAPE"/*#Frozen*/,
                            "EXCEPT"/*#Frozen*/,
                            "EXCEPTION"/*#Frozen*/,
                            "EXEC"/*#Frozen*/,
                            "EXECUTE"/*#Frozen*/,
                            "EXISTS"/*#Frozen*/,
                            "EXIT"/*#Frozen*/,
                            "EXTERNAL"/*#Frozen*/,
                            "EXTRACT"/*#Frozen*/,
                            "FALSE"/*#Frozen*/,
                            "FAST"/*#Frozen*/,
                            "FETCH"/*#Frozen*/,
                            "FILE"/*#Frozen*/,
                            "FILLFACTOR"/*#Frozen*/,
                            "FIRST"/*#Frozen*/,
                            "FLOAT"/*#Frozen*/,
                            "FOR"/*#Frozen*/,
                            "FOREIGN"/*#Frozen*/,
                            "FORTRAN"/*#Frozen*/,
                            "FOUND"/*#Frozen*/,
                            "FREETEXT"/*#Frozen*/,
                            "FROM"/*#Frozen*/,
                            "FULL"/*#Frozen*/,
                            "FUNCTION"/*#Frozen*/,
                            "GET"/*#Frozen*/,
                            "GLOBAL"/*#Frozen*/,
                            "GO"/*#Frozen*/,
                            "GOTO"/*#Frozen*/,
                            "GRANT"/*#Frozen*/,
                            "GROUP"/*#Frozen*/,
                            "HAVING"/*#Frozen*/,
                            "HOLDLOCK"/*#Frozen*/,
                            "HOUR"/*#Frozen*/,
                            "IDENTITY"/*#Frozen*/,
                            "IDENTITY_INSERT"/*#Frozen*/,
                            "IDENTITYCOL"/*#Frozen*/,
                            "IF"/*#Frozen*/,
                            "IMAGE"/*#Frozen*/,
                            "IMMEDIATE"/*#Frozen*/,
                            "IN"/*#Frozen*/,
                            "INCLUDE"/*#Frozen*/,
                            "INDEX"/*#Frozen*/,
                            "INDICATOR"/*#Frozen*/,
                            "INITIALLY"/*#Frozen*/,
                            "INNER"/*#Frozen*/,
                            "INPUT"/*#Frozen*/,
                            "INSENSITIVE"/*#Frozen*/,
                            "INSERT"/*#Frozen*/,
                            "INSTEAD"/*#Frozen*/,
                            "INT"/*#Frozen*/,
                            "INTEGER"/*#Frozen*/,
                            "INTERSECT"/*#Frozen*/,
                            "INTERVAL"/*#Frozen*/,
                            "INTO"/*#Frozen*/,
                            "IS"/*#Frozen*/,
                            "ISOLATION"/*#Frozen*/,
                            "JOIN"/*#Frozen*/,
                            "KEY"/*#Frozen*/,
                            "KILL"/*#Frozen*/,
                            "LANGUAGE"/*#Frozen*/,
                            "LAST"/*#Frozen*/,
                            "LEADING"/*#Frozen*/,
                            "LEFT"/*#Frozen*/,
                            "LEVEL"/*#Frozen*/,
                            "LIKE"/*#Frozen*/,
                            "LINENO"/*#Frozen*/,
                            "LOAD"/*#Frozen*/,
                            "LOCAL"/*#Frozen*/,
                            "MATCH"/*#Frozen*/,
                            "MINUTE"/*#Frozen*/,
                            "MODULE"/*#Frozen*/,
                            "MONEY"/*#Frozen*/,
                            "MONTH"/*#Frozen*/,
                            "NAMES"/*#Frozen*/,
                            "NATIONAL"/*#Frozen*/,
                            "NATURAL"/*#Frozen*/,
                            "NCHAR"/*#Frozen*/,
                            "NEXT"/*#Frozen*/,
                            "NO"/*#Frozen*/,
                            "NOCHECK"/*#Frozen*/,
                            "NOCOUNT"/*#Frozen*/,
                            "NONCLUSTERED"/*#Frozen*/,
                            "NONE"/*#Frozen*/,
                            "NOT"/*#Frozen*/,
                            "NTEXT"/*#Frozen*/,
                            "NULL"/*#Frozen*/,
                            "NULLIF"/*#Frozen*/,
                            "NUMERIC"/*#Frozen*/,
                            "NVARCHAR"/*#Frozen*/,
                            "OCTET_LENGTH"/*#Frozen*/,
                            "OF"/*#Frozen*/,
                            "OFF"/*#Frozen*/,
                            "OFFSETS"/*#Frozen*/,
                            "ON"/*#Frozen*/,
                            "ONLY"/*#Frozen*/,
                            "OPEN"/*#Frozen*/,
                            "OPTION"/*#Frozen*/,
                            "OR"/*#Frozen*/,
                            "ORDER"/*#Frozen*/,
                            "OUTER"/*#Frozen*/,
                            "OUTPUT"/*#Frozen*/,
                            "OVER"/*#Frozen*/,
                            "OVERLAPS"/*#Frozen*/,
                            "PAD"/*#Frozen*/,
                            "PARTIAL"/*#Frozen*/,
                            "PASCAL"/*#Frozen*/,
                            "PERCENT"/*#Frozen*/,
                            "PLAN"/*#Frozen*/,
                            "POSITION"/*#Frozen*/,
                            "PREPARE"/*#Frozen*/,
                            "PRESERVE"/*#Frozen*/,
                            "PRIMARY"/*#Frozen*/,
                            "PRINT"/*#Frozen*/,
                            "PRIOR"/*#Frozen*/,
                            "PRIVILEGES"/*#Frozen*/,
                            "PROC"/*#Frozen*/,
                            "PROCEDURE"/*#Frozen*/,
                            "PUBLIC"/*#Frozen*/,
                            "RAISERROR"/*#Frozen*/,
                            "READ"/*#Frozen*/,
                            "READTEXT"/*#Frozen*/,
                            "REAL"/*#Frozen*/,
                            "RECONFIGURE"/*#Frozen*/,
                            "REFERENCES"/*#Frozen*/,
                            "RELATIVE"/*#Frozen*/,
                            "REPLICATION"/*#Frozen*/,
                            "RESTORE"/*#Frozen*/,
                            "RESTRICT"/*#Frozen*/,
                            "RETURN"/*#Frozen*/,
                            "RETURNS"/*#Frozen*/,
                            "REVOKE"/*#Frozen*/,
                            "RIGHT"/*#Frozen*/,
                            "ROLLBACK"/*#Frozen*/,
                            "ROWCOUNT"/*#Frozen*/,
                            "ROWGUIDCOL"/*#Frozen*/,
                            "ROWS"/*#Frozen*/,
                            "RULE"/*#Frozen*/,
                            "SAVE"/*#Frozen*/,
                            "SCHEMA"/*#Frozen*/,
                            "SCROLL"/*#Frozen*/,
                            "SECOND"/*#Frozen*/,
                            "SECTION"/*#Frozen*/,
                            "SELECT"/*#Frozen*/,
                            "SESSION"/*#Frozen*/,
                            "SESSION_USER"/*#Frozen*/,
                            "SET"/*#Frozen*/,
                            "SETUSER"/*#Frozen*/,
                            "SHUTDOWN"/*#Frozen*/,
                            "SIZE"/*#Frozen*/,
                            "SMALLDATETIME"/*#Frozen*/,
                            "SMALLINT"/*#Frozen*/,
                            "SMALLMONEY"/*#Frozen*/,
                            "SOME"/*#Frozen*/,
                            "SPACE"/*#Frozen*/,
                            "SQL"/*#Frozen*/,
                            "SQL_VARIANT"/*#Frozen*/,
                            "SQLCA"/*#Frozen*/,
                            "SQLCODE"/*#Frozen*/,
                            "SQLERROR"/*#Frozen*/,
                            "SQLSTATE"/*#Frozen*/,
                            "SQLWARNING"/*#Frozen*/,
                            "STATISTICS"/*#Frozen*/,
//				"SUBSTRING",
                            "SYNONYM"/*#Frozen*/,
                            "SYSTEM_USER"/*#Frozen*/,
                            "TABLE"/*#Frozen*/,
                            "TEMPORARY"/*#Frozen*/,
                            "TEXT"/*#Frozen*/,
                            "TEXTSIZE"/*#Frozen*/,
                            "THEN"/*#Frozen*/,
                            "TIME"/*#Frozen*/,
                            "TIMESTAMP"/*#Frozen*/,
                            "TIMEZONE_HOUR"/*#Frozen*/,
                            "TIMEZONE_MINUTE"/*#Frozen*/,
                            "TINYINT"/*#Frozen*/,
                            "TO"/*#Frozen*/,
                            "TOP"/*#Frozen*/,
                            "TRAILING"/*#Frozen*/,
                            "TRAN"/*#Frozen*/,
                            "TRANSACTION"/*#Frozen*/,
                            "TRANSLATE"/*#Frozen*/,
                            "TRANSLATION"/*#Frozen*/,
                            "TRIGGER"/*#Frozen*/,
                            "TRIM"/*#Frozen*/,
                            "TRUE"/*#Frozen*/,
                            "TRUNCATE"/*#Frozen*/,
                            "TRY"/*#Frozen*/,
                            "TSEQUAL"/*#Frozen*/,
                            "UNION"/*#Frozen*/,
                            "UNIQUE"/*#Frozen*/,
                            "UNIQUEIDENTIFIER"/*#Frozen*/,
                            "UNKNOWN"/*#Frozen*/,
                            "UPDATE"/*#Frozen*/,
                            "UPDATETEXT"/*#Frozen*/,
                            "USAGE"/*#Frozen*/,
                            "USE"/*#Frozen*/,
                            "USER"/*#Frozen*/,
                            "USING"/*#Frozen*/,
                            "VALUE"/*#Frozen*/,
                            "VALUES"/*#Frozen*/,
                            "VARBINARY"/*#Frozen*/,
                            "VARCHAR"/*#Frozen*/,
                            "VARYING"/*#Frozen*/,
                            "VIEW"/*#Frozen*/,
                            "WAITFOR"/*#Frozen*/,
                            "WHEN"/*#Frozen*/,
                            "WHENEVER"/*#Frozen*/,
                            "WHERE"/*#Frozen*/,
                            "WHILE"/*#Frozen*/,
                            "WITH"/*#Frozen*/,
                            "WORK"/*#Frozen*/,
                            "WRITE"/*#Frozen*/,
                            "WRITETEXT"/*#Frozen*/,
                            "ZONE"/*#Frozen*/
                    },
                    /* IV: Vse sistemnye funktsii  */
                    {
                            "@@CONNECTIONS"/*#Frozen*/,
                            "@@CPU_BUSY"/*#Frozen*/,
                            "@@CURSOR_ROWS"/*#Frozen*/,
                            "@@DATEFIRST"/*#Frozen*/,
                            "@@DBTS"/*#Frozen*/,
                            "@@ERROR"/*#Frozen*/,
                            "@@FETCH_STATUS"/*#Frozen*/,
                            "@@IDENTITY"/*#Frozen*/,
                            "@@IDLE"/*#Frozen*/,
                            "@@IO_BUSY"/*#Frozen*/,
                            "@@LANGID"/*#Frozen*/,
                            "@@LANGUAGE"/*#Frozen*/,
                            "@@LOCK_TIMEOUT"/*#Frozen*/,
                            "@@MAX_CONNECTIONS"/*#Frozen*/,
                            "@@MAX_PRECISION"/*#Frozen*/,
                            "@@NESTLEVEL"/*#Frozen*/,
                            "@@OPTIONS"/*#Frozen*/,
                            "@@PACK_RECEIVED"/*#Frozen*/,
                            "@@PACK_SENT"/*#Frozen*/,
                            "@@PACKET_ERRORS"/*#Frozen*/,
                            "@@PROCID"/*#Frozen*/,
                            "@@REMSERVER"/*#Frozen*/,
                            "@@ROWCOUNT"/*#Frozen*/,
                            "@@SERVERNAME"/*#Frozen*/,
                            "@@SERVICENAME"/*#Frozen*/,
                            "@@SPID"/*#Frozen*/,
                            "@@TEXTSIZE"/*#Frozen*/,
                            "@@TIMETICKS"/*#Frozen*/,
                            "@@TOTAL_ERRORS"/*#Frozen*/,
                            "@@TOTAL_READ"/*#Frozen*/,
                            "@@TOTAL_WRITE"/*#Frozen*/,
                            "@@TRANCOUNT"/*#Frozen*/,
                            "@@VERSION"/*#Frozen*/,
                            "ABS"/*#Frozen*/,
                            "ACOS"/*#Frozen*/,
                            "APP_NAME"/*#Frozen*/,
                            "ASCII"/*#Frozen*/,
                            "ASIN"/*#Frozen*/,
                            "ATAN"/*#Frozen*/,
                            "ATN2"/*#Frozen*/,
                            "AVG"/*#Frozen*/,
                            "BINARY_CHECKSUM"/*#Frozen*/,
                            "CASE"/*#Frozen*/,
                            "CAST"/*#Frozen*/,
                            "CEILING"/*#Frozen*/,
                            "CHAR"/*#Frozen*/,
                            "CHARINDEX"/*#Frozen*/,
                            "CHECKSUM"/*#Frozen*/,
                            "CHECKSUM_AGG"/*#Frozen*/,
                            "COALESCE"/*#Frozen*/,
                            "COL_LENGTH"/*#Frozen*/,
                            "COL_NAME"/*#Frozen*/,
                            "COLLATIONPROPERTY"/*#Frozen*/,
                            "COLUMNPROPERTY"/*#Frozen*/,
                            "CONTAINSTABLE"/*#Frozen*/,
                            "CONVERT"/*#Frozen*/,
                            "COS"/*#Frozen*/,
                            "COT"/*#Frozen*/,
                            "COUNT"/*#Frozen*/,
                            "COUNT_BIG"/*#Frozen*/,
                            "CURRENT_TIMESTAMP"/*#Frozen*/,
                            "CURRENT_USER"/*#Frozen*/,
                            "CURSOR_STATUS"/*#Frozen*/,
                            "DATABASEPROPERTY"/*#Frozen*/,
                            "DATABASEPROPERTYEX"/*#Frozen*/,
                            "DATALENGTH"/*#Frozen*/,
                            "DATEADD"/*#Frozen*/,
                            "DATEDIFF"/*#Frozen*/,
                            "DATENAME"/*#Frozen*/,
                            "DATEPART"/*#Frozen*/,
                            "DAY"/*#Frozen*/,
                            "DB_ID"/*#Frozen*/,
                            "DB_NAME"/*#Frozen*/,
                            "DEGREES"/*#Frozen*/,
                            "DIFFERENCE"/*#Frozen*/,
                            "EXP"/*#Frozen*/,
                            "FILE_ID"/*#Frozen*/,
                            "FILE_NAME"/*#Frozen*/,
                            "FILEGROUP_ID"/*#Frozen*/,
                            "FILEGROUP_NAME"/*#Frozen*/,
                            "FILEGROUPPROPERTY"/*#Frozen*/,
                            "FILEPROPERTY"/*#Frozen*/,
                            "FLOOR"/*#Frozen*/,
                            "fn_helpcollations"/*#Frozen*/,
                            "fn_listextendedproperty"/*#Frozen*/,
                            "fn_servershareddrives"/*#Frozen*/,
                            "fn_trace_geteventinfo"/*#Frozen*/,
                            "fn_trace_getfilterinfo"/*#Frozen*/,
                            "fn_trace_getinfo"/*#Frozen*/,
                            "fn_trace_gettable"/*#Frozen*/,
                            "fn_virtualfilestats"/*#Frozen*/,
                            "FORMATMESSAGE"/*#Frozen*/,
                            "FREETEXTTABLE"/*#Frozen*/,
                            "FULLTEXTCATALOGPROPERTY"/*#Frozen*/,
                            "FULLTEXTSERVICEPROPERTY"/*#Frozen*/,
                            "GETANSINULL"/*#Frozen*/,
                            "GETDATE"/*#Frozen*/,
                            "GETUTCDATE"/*#Frozen*/,
                            "GROUPING"/*#Frozen*/,
                            "HAS_DBACCESS"/*#Frozen*/,
                            "HOST_ID"/*#Frozen*/,
                            "HOST_NAME"/*#Frozen*/,
                            "IDENT_CURRENT"/*#Frozen*/,
                            "IDENT_INCR"/*#Frozen*/,
                            "IDENT_SEED"/*#Frozen*/,
                            "IDENTITY"/*#Frozen*/,
                            "INDEX_COL"/*#Frozen*/,
                            "INDEXKEY_PROPERTY"/*#Frozen*/,
                            "INDEXPROPERTY"/*#Frozen*/,
                            "IS_MEMBER"/*#Frozen*/,
                            "IS_SRVROLEMEMBER"/*#Frozen*/,
                            "ISDATE"/*#Frozen*/,
                            "ISNULL"/*#Frozen*/,
                            "ISNUMERIC"/*#Frozen*/,
                            "LEFT"/*#Frozen*/,
                            "LEN"/*#Frozen*/,
                            "LOG"/*#Frozen*/,
                            "LOG10"/*#Frozen*/,
                            "LOWER"/*#Frozen*/,
                            "LTRIM"/*#Frozen*/,
                            "MAX"/*#Frozen*/,
                            "MIN"/*#Frozen*/,
                            "MONTH"/*#Frozen*/,
                            "NCHAR"/*#Frozen*/,
                            "NEWID"/*#Frozen*/,
                            "NULLIF"/*#Frozen*/,
                            "OBJECT_ID"/*#Frozen*/,
                            "OBJECT_NAME"/*#Frozen*/,
                            "OBJECTPROPERTY"/*#Frozen*/,
                            "OPENDATASOURCE"/*#Frozen*/,
                            "OPENQUERY"/*#Frozen*/,
                            "OPENROWSET"/*#Frozen*/,
                            "OPENXML"/*#Frozen*/,
                            "PARSENAME"/*#Frozen*/,
                            "PATINDEX"/*#Frozen*/,
                            "PERMISSIONS"/*#Frozen*/,
                            "PI"/*#Frozen*/,
                            "POWER"/*#Frozen*/,
                            "QUOTENAME"/*#Frozen*/,
                            "RADIANS"/*#Frozen*/,
                            "RAND"/*#Frozen*/,
                            "REPLACE"/*#Frozen*/,
                            "REPLICATE"/*#Frozen*/,
                            "REVERSE"/*#Frozen*/,
                            "RIGHT"/*#Frozen*/,
                            "ROUND"/*#Frozen*/,
                            "ROWCOUNT_BIG"/*#Frozen*/,
                            "RTRIM"/*#Frozen*/,
                            "SCOPE_IDENTITY"/*#Frozen*/,
                            "SERVERPROPERTY"/*#Frozen*/,
                            "SESSION_USER"/*#Frozen*/,
                            "SESSIONPROPERTY"/*#Frozen*/,
                            "SIGN"/*#Frozen*/,
                            "SIN"/*#Frozen*/,
                            "SOUNDEX"/*#Frozen*/,
                            "SPACE"/*#Frozen*/,
                            "SQL_VARIANT_PROPERTY"/*#Frozen*/,
                            "SQRT"/*#Frozen*/,
                            "SQUARE"/*#Frozen*/,
                            "STATS_DATE"/*#Frozen*/,
                            "STDDEV"/*#Frozen*/,
                            "STDDEVP"/*#Frozen*/,
                            "STDEV"/*#Frozen*/,
                            "STDEVP"/*#Frozen*/,
                            "STR"/*#Frozen*/,
                            "STUFF"/*#Frozen*/,
                            "SUBSTRING"/*#Frozen*/,
                            "SUM"/*#Frozen*/,
                            "SUSER_SID"/*#Frozen*/,
                            "SUSER_SNAME"/*#Frozen*/,
                            "SYSTEM_USER"/*#Frozen*/,
                            "TAN"/*#Frozen*/,
                            "TEXTPTR"/*#Frozen*/,
                            "TEXTVALID"/*#Frozen*/,
                            "TYPEPROPERTY"/*#Frozen*/,
                            "UNICODE"/*#Frozen*/,
                            "UPPER"/*#Frozen*/,
                            "USER"/*#Frozen*/,
                            "USER_ID"/*#Frozen*/,
                            "USER_NAME"/*#Frozen*/,
                            "VAR"/*#Frozen*/,
                            "VARP"/*#Frozen*/,
                            "YEAR"/*#Frozen*/
                    },
                    /* V: Vse ostal'nye identifikatory  */
                    {},
                    /* VI: Vse spetsial'nye simvoly  */
                    {},
                    /* VII: strokovye constanty  */
                    {}

            };

    public static final MutableAttributeSet[] TOKENIZER_CATEGORY_STYLES =
            {
                    //  1: MSSQL

                    /* I: Kommentarii  */
                    createStyle(false, true, new Color(0x00, 150, 0)),
                    /* II: Vse konstanty  */
                    createStyle(false, false, Color.RED),
                    /* III: Kljuchevye slova SQL i T-SQL */
                    createStyle(true, false, Color.BLUE),
                    /* IV: Vse sistemnye funktsii  */
                    createStyle(true, false, Color.MAGENTA),
                    /* V: Vse ostal'nye identifikatory  */
                    createStyle(false, false, new Color(0x60, 0x60, 0x60)),
                    /* VI: Vse spetsial'nye simvoly  */
                    createStyle(true, false, new Color(0x80, 0x00, 0x00)),
                    /* VII: strokovye constanty  */
                    createStyle(true, false, new Color(00, 133, 00))
            };


    /**
     * obschee kolichestvo kategorij dlja mssql
     */
    public static final int TOKENIZER_MSSQL_CATEGORY_COUNT = TOKENIZER_CATEGORY_STRING_CONSTANTS.length;
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

    /**
     * Nachal'naja shirina rabochej oblasti Zebry.
     * Dlja vkljuchenija etoj anti-wrap fichi ustanovit' znachenie bol'she 1000.
     */
    protected static final int INITIAL_SCROLL_WIDTH = 5000;
    /**
     * Umolchatel'nyj tsvet fona paragrafa dokumenta Zebry
     */
    public static final Color DEFAULT_PARAGRAPH_BCKG_COLOR = Color.white;
    /**
     * Umolchatel'nyj tsvet teksta dokumenta Zebry
     */
    public static final Color DEFAULT_TEXT_COLOR = Color.black;
    /**
     * SHag podcherkivanija teksta
     */
    public static final int DEFAULT_UNDERLINE_TEXT_STEP = 2;
    /**
     * Umolchatel'nyj stil' paragrafa dokumenta Zebry
     */
    public static final MutableAttributeSet DEFAULT_PARAGRAPH_STYLE = createParagraphStyle(12, "Monospaced"/*#Frozen*/, DEFAULT_PARAGRAPH_BCKG_COLOR);
    /**
     * Ctil' skrytogo paragrafa dokumenta Zebry
     */
    public static final MutableAttributeSet CLOSED_PARAGRAPH_STYLE = createParagraphStyle(0, "Dialog"/*#Frozen*/, DEFAULT_PARAGRAPH_BCKG_COLOR, 0, 0);
    /**
     * Umolchatel'nyj stil' teksta dokumenta Zebry
     */
    public static final MutableAttributeSet DEFAULT_TEXT_STYLE = createStyle(false, false, DEFAULT_TEXT_COLOR);
    /**
     * Maskimal'noe kolichestvo urovnej vlozhennostej pokazyvaemykh razdel'no po gorizontali
     */
    public static final int MAX_NUMBER_LEVELS_IN_WIDTH_SEPARATION = 10;
    /**
     * Maskimal'noe kolichestvo urovnej vlozhennostej pokazyvaemykh razdel'no po vertikali
     */
    public static final int MAX_NUMBER_LEVELS_IN_HEIGHT_SEPARATION = 5;
    /**
     * SHirina oblasti upravleniem otkrytija/zakrytija uzlov
     */
    public static final int OPEN_CLOSE_AREA_WIDTH = 9;
    /**
     * Vysota oblasti upravleniem otkrytija/zakrytija uzlov
     */
    public static final int OPEN_CLOSE_AREA_HEIGHT = 9;
    /**
     * Sdvig po gorizontali oblasti upravlenija otkrytiem/zakrytiem uzlov
     */
    public static final int OPEN_CLOSE_AREA_SHIFT_DX = 2;
    /**
     * Sdvig po vertikali oblasti upravlenija otkrytiem/zakrytiem uzlov
     */
    public static final int OPEN_CLOSE_AREA_SHIFT_DY = 2;
    /**
     * SHag po vertikali mezhdu raznymi urovnjami vlozhennosti
     */
    public static final int VERTICAL_LEVELS_STEP = 3;
    /**
     * SHag po gorizontali mezhdu raznymi urovnjami vlozhennosti
     */
    public static final int HORIZONTAL_LEVELS_STEP = OPEN_CLOSE_AREA_WIDTH + OPEN_CLOSE_AREA_SHIFT_DX;
    /**
     * Maksimal'naja shirina oblasti dlja otobrazhenija vlozhennosti urovnej
     */
    public static final int MAX_IDENT_AREA_WIDTH = MAX_NUMBER_LEVELS_IN_WIDTH_SEPARATION * HORIZONTAL_LEVELS_STEP;
    /**
     * Dopolnitel'noe smeschenie po vertikali na granitse intervalov vlozhennosti
     */
    public static final int ADDITIONAL_DY_SHIFT = 2;

    /**
     * Umolchatel'nyj tsvet podcherkivanija ob'javlenija peremennykh
     */
    public static final int UNDERLINE_DECLARATION = 0;
    /**
     * Umolchatel'nyj tsvet podcherkivanija oshibok
     */
    public static final int UNDERLINE_ERROR = 1;
    /**
     * Umolchatel'nyj tsvet podcherkivanija preduprezhedenij
     */
    public static final int UNDERLINE_WARNING = 2;
    /**
     * Umolchatel'nyj tsvet podcherkivanija soobschenij
     */
    public static final int UNDERLINE_MESSAGE = 3;

    /**
     * Imena categorij podcherkivanij
     */
    public static final String[] UNDERLINE_NAMES =
            {
                    "zebra.constants.identifier.declaration",
                    "zebra.constants.errors",
                    "zebra.constants.warnings",
                    "zebra.constants.information.messages",
            };

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    /**
     * kolichestvo pribelov v odnom shage otstupa
     */
    public static final int INDENT_SIZE = 2;
    /**
     * shag shtrikhofki zakrytykh uzlov Zebry
     */
    public static final int HETCH_STEP_DX = 10;
    /**
     * maksimal'noe kolchestvo simvolov koda v podskazke zakrytykh uzlov Zebry
     */
    public static final int MAX_CLOSED_NODE_TOOLTIP_SIZE = 300;
    /**
     * kolichestvo blokov, vydeljaemykh kaskadno vlevo
     */
    public static final int LEFT_CASCADE_SELECTION_SHIFT = 0;
    /**
     * kolichestvo blokov, vydeljaemykh kaskadno vpravo
     */
    public static final int RIGHT_CASCADE_SELECTION_SHIFT = 100;
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    // Flagi
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    /**
     * ispol'zovat' ili net cheredovanie tsvetov odnourovnevykh blokov Zebry
     */
    public static final boolean USE_COLOR_CHANGE_FOR_ONELEVEL_NODES = false;
    /**
     * shtrikhovat' ili net zakrytye uzly Zebry
     */
    public static final boolean USE_HETCH_FOR_CLOSED_NODES = true;
    /**
     * Nasledovat' ili net rezhim raskraski blokov iz okna-istonchnika
     */
    public static final boolean INHERIT_PAINT_MODE_FROM_SOURCE = true;
    /**
     * Rasstavljat' ili net rezhimy raskraski v okne-rezul'tate
     */
    public static final boolean USE_PAINT_MODES_ONLY_FOR_SELECTION = false;
    /**
     * Razreshat' ili net zakryvat'/zakryvat' uzly
     */
    public static final boolean ALLOW_TOGGLE_NODES = true;

    /**
     * Formiruet nabor atributov dlja sintaksicheskogo formatirovanija
     *
     * @param bold
     * @param italic
     * @param col    tsvet teksta
     */
    protected static MutableAttributeSet createStyle(boolean bold, boolean italic, Color col) {
        MutableAttributeSet attr = new SimpleAttributeSet()/*#Frozen*/;
        StyleConstants.setBold(attr, bold);
        StyleConstants.setItalic(attr, italic);
        if (col != null)
            StyleConstants.setForeground(attr, col);
        return attr;
    }

    /**
     * Formiruet nabor atributov dlja paragrafa.
     *
     * @param fontSize  razmer shrifta
     * @param fontName  naimenovanie shrifta
     * @param bckgColor tsvet fona
     */
    protected static MutableAttributeSet createParagraphStyle(int fontSize, String fontName, Color bckgColor) {
        MutableAttributeSet attr = new SimpleAttributeSet();

        StyleConstants.setFontSize(attr, fontSize);
        StyleConstants.setFontFamily(attr, fontName);
        if (bckgColor != null)
            StyleConstants.setBackground(attr, bckgColor);
        return attr;
    }

    /**
     * Formiruet nabor atributov dlja paragrafa.
     *
     * @param fontSize   razmer shrifta
     * @param fontName   naimenovanie shrifta
     * @param bckgColor  tsvet fona
     * @param spaceAbove vysota verkhnej granitsy
     * @param spaceBelow vysota nizhnej granitsy
     */
    protected static MutableAttributeSet createParagraphStyle(int fontSize, String fontName, Color bckgColor, int spaceAbove, int spaceBelow) {
        MutableAttributeSet attr = createParagraphStyle(fontSize, fontName, bckgColor);
        StyleConstants.setSpaceAbove(attr, spaceAbove);
        StyleConstants.setSpaceBelow(attr, spaceBelow);
        return attr;
    }

}

